var newBaseUrl = 'https://xmg-shop.kanfoshan.cn'
var h5Url = 'https://xmg-h5.kanfoshan.cn/#'
var webSock = 'wss://xmg-shop.kanfoshan.cn/wss'
// #ifdef H5
let proType = process.env.NODE_ENV == 'production'
if (proType) {
	// 正式api
	newBaseUrl = 'https://xmg-shop.kanfoshan.cn'
	h5Url = 'https://xmg-h5.kanfoshan.cn/#'
	webSock = 'wss://xmg-shop.kanfoshan.cn/wss'
} else {
	// 测试api
	newBaseUrl = 'https://xmgts.kanfoshan.cn'
	h5Url = 'https://xmgts-h5.kanfoshan.cn/#'
	webSock = 'wss://xmgts.kanfoshan.cn/wss'
}
// #endif

// #ifdef MP-WEIXIN
let envVs = wx.getAccountInfoSync().miniProgram.envVersion
if (envVs == 'release') {
	newBaseUrl = 'https://xmg-shop.kanfoshan.cn'
	webSock = 'wss://xmg-shop.kanfoshan.cn/wss'
} else {
	// 线下
	newBaseUrl = 'https://xmgts.kanfoshan.cn'
	webSock = 'wss://xmgts.kanfoshan.cn/wss'
}
// #endif

const baseUrl = newBaseUrl // api请求地址，小程序必须是https
const imgDomain = newBaseUrl // 图片域名，
const imgPath = `${newBaseUrl}/public/static/images/` // 本地图片 放在服务器的地址
const webSocket = webSock // 客服地址
const pingInterval = 1500 // 本地端主动给服务器ping的时间, 0 则不开启 , 单位秒
const h5Domain = h5Url // H5端域名
const mpKey = 'I6LBZ-5U6LO-FPQWL-SIRJN-RFNMF-KZFVJ' // 腾讯地图key
const apiSecurity = false // api安全
const publicKey = '' // 公钥
const IM_SDK_APPID = 1400481911 // 腾讯im的skdID

export default {
	baseUrl,
	imgDomain,
	imgPath,
	webSocket,
	pingInterval,
	h5Domain,
	mpKey,
	apiSecurity,
	publicKey,
	IM_SDK_APPID
}
